1. Field of the Invention
The present invention generally relates to a method, system and program product for asynchronously processing requests. Specifically, the present invention allows network-based requests (e.g., web requests) to be processed by an application server without maintaining a constant connection with a client.
2. Related Art
As use of the Internet becomes more popular, web users are increasingly relying on the world wide web as a source of information. In a typical implementation, a user will operate a web browser on a client, and submit a “request” for a particular web page to a server. One or more “servlets” (or the like) on the server will process the request and return the appropriate web page to the browser. To this extent, one specific technology that is gaining widespread use is the concept of web portal pages. In general, web portal pages provide a mechanism for a user to receive targeted and personalized content. Typically, a portal page includes sections or visual portlets that each contain particular portal content that is selected and formatted according to a user's preferences. For example, a user could establish his/her own portal page that has sections for news, weather and sports. When the portal page is requested, a portal program on the server would obtain the desired content from the appropriate content providers. Once obtained, the portal content would be aggregated, and then displayed in the appropriate sections as a web portal page. This technology has lead to the explosion of personalized “home” pages for individual web users.
Unfortunately, in each of these instances, the handling of a request and response is done synchronously. That is, a request is sent to the server, and the connection between the client and server is maintained until the response is returned. Maintaining a connection in this manner could not only limit or prevent the client's capability to perform other tasks, but it also could limit or prevent the capability of the server to connect with other clients. This is especially the case where the response must be processed by servlets/portlets. For example, in the case of a portal page, creating a response to the request could require interfacing with numerous content sources. As such, creation of the response could take several seconds. If the connection between the client and server is maintained for this entire time, the above-indicated problems could arise.
As known in the art, under the Hypertext Transfer Protocol (HTTP), a server cannot generally initiate a connection with a client. Rather, the client must initiate a connection with the server. Accordingly, if the connection between the client and server is terminated while a request is being processed, only the client can initiate a new connection to receive the response. Currently, no existing technology allows for the connection between the client and server to be terminated as the request is being processed, while not requiring deliberate/manual modification of the client to reestablish the connection at a later time.
In view of the foregoing, there exists a need for a method, system and program product for asynchronously processing requests. Specifically, a need exists for a system that allows a connection between a client and a server to be terminated while a request from the client is being processed. A further need exists for the client to automatically establish a new connection with the server at a later time without requiring modification or deliberate action on the part of the client.